<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<!-- meta -->
<meta name="keywords" content="">
<meta name="description" content="">
<!-- /meta -->
<title>ファイルアップロード</title>
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/base.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/headerfooter.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/ulol.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/arrow.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/elements.css">
<!-- admin -->
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/base_admin.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/elements_admin.css">
<!-- /admin -->

<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/for_winie3.css">
<!--[if gte IE 5]>
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/for_over_winie5.css">
<![endif]-->
<!--[if IE 5]>
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/for_winie5.css">
<![endif]-->
<script src="<%= request.getContextPath() %>/common/js/jquery-1.4.4.min.js" type="text/javascript"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/common/js/library.js"></script>
<script type="text/javascript">
$(function() {
	$("#uploadId").change(function() {
		var fullpath = $("#uploadId").val();
		$("#fileName").val(fullpath.substring(fullpath.lastIndexOf("\\")+1, fullpath.length));

	});
})
</script>
</head>
<body id="dch" onload="window.resizeTo(650,500);">
<!-- === headerArea === -->
<div id="headerArea">
<a name="pageTop" id="pageTop"></a>
<table border="0" cellspacing="0" cellpadding="0" width="600">
	<tr valign="top">
		<td height="28" id="gNaviArea">
		<!-- === gNaviArea === -->
			&nbsp;
		<!-- === /gNaviArea === -->
		</td>
	</tr>
</table>
</div><!-- === /headerArea === -->
<!-- === mainArea === -->
<div id="mainArea">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr valign="top">
		<td width="140" id="leftArea">
		</td>
		<td width="20"><img src="<%= request.getContextPath() %>/common/images/spacer.gif" width="20" height="4" border="0" alt=""></td>
		<td id="contentsArea">
		<!-- === contentsArea === -->
			<!-- headingLv01Block -->
			<div class="headingLv01Block">
				<!-- headingLv01 -->
				<h1>ファイルアップロード</h1>
				<!-- /headingLv01 -->
			</div>
			<!-- /headingLv01Block -->
			<!-- columnB01 -->
			<s:actionerror/>
			<s:actionmessage/>
			<s:fielderror/>
			<div class="headingLv02">
			<table border="0" cellspacing="0" cellpadding="5" width="558">
				<tr>
					<td><p><em>ファイル情報</em></p></td>
				</tr>
			</table>
			</div>
			<!-- /columnB01 -->
			<s:form name="uploadForm" action="popup-doUpload" enctype="multipart/form-data" method="POST">
			<s:hidden name="uploadFileName" />
			<s:hidden name="thumbNail" />
			<s:hidden name="fileType" />

			<div class="tableA01">
			<span><font color="#2F4F4F" style="font-size: 12px;">*アップロード可能形式:jpeg,jpg,png,tiff,gif,avi,mp4,flv,mpg,mpeg,wmv,asf</font></span>
			<table border="1" cellspacing="0" cellpadding="5" width="558">
				<tr>
					<!-- ラベル --><th class="lv01B" width="170"><label for="uploadFile">ファイル</label></th>
					<!-- エラー --><th width="11" class="error">&nbsp;</th>
					<!-- 内容 --><td><s:file name ="upload" id = "uploadId"/>&nbsp;</td>
				</tr>
				<tr>
					<!-- ラベル --><th class="lv01B" width="170"><label for="fileName">ファイル名</label></th>
					<!-- エラー --><th width="11" class="error">&nbsp;</th>
					<!-- 内容 --><td><s:textfield name="fileName" id = "fileName"/></td>
				</tr>
			</table>

			</div>
			<div class="pageNaviC01">
			<table border="0" cellspacing="0" cellpadding="10" width="558">
				<tr>
					<td width="298" class="left"><p><input type="button" value="キャンセル" style="width:100px" onclick="window.close();"></p></td>
					<td width="130" class="left">&nbsp;</td>
					<td width="130" class="right"><p><input type="button" value="アップロード" style="width:130px" onclick="document.uploadForm.submit();this.disabled=true" ></p></td>
				</tr>
			</table>
			</div>
			</s:form>

			<!-- === /contentsArea === -->
		</td>
		<td width="16"><img src="<%= request.getContextPath() %>/common/images/spacer.gif" width="16" height="4" border="0" alt=""></td>
	</tr>
</table>
</div><!-- === /mainArea === -->
<s:if test="thumbNail !=null && thumbNail.length() != 0">
<script type="text/javascript">

 var uploadFilename = document.uploadForm.uploadFileName.value;

 if (uploadFilename != "") {

	 window.opener.fileInfoAdd('${realFileName}','${uploadFileName}','${fileName}','${thumbNail}','${fileType}');

	 window.close();
  }
</script>
</s:if>
<!-- === footerArea === -->
<div id="footerArea">
<!--#include virtual="<%= request.getContextPath() %>/common/include/footer.html" -->
</div><!-- === /footerArea === -->
</body>
</html>
<!-- System Architect is COOBA Corp
	Copyright 2010 COOBA Corp All rights reserved -->
